import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表查询
export const getList = params => axios.post(`${SERVER.WHOLESALES}/StockControl/selectStockControl`, params);
// 导出
export const exportOem = params => axios.post(`${SERVER.RETAIL}/inventoryManage/exportOEM`, params, { responseType: 'blob' });
// 车辆配置五级选择
export const vehicleConfiguration = (id, params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/productInfo/productTreeNew`, { params: { type: id, level: 6, ...params } });

// / 导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);

//查询所有品牌
export const getBrandAll = () => axios.post(`${SERVER.midEndDictCenter}/basicdata/basicdata/brand/all`, { data: {} });

//品牌改变时查询车系
export const getSeriesAll = params => axios.post(`${SERVER.midEndDictCenter}/basicdata/basicdata/series/all`, params);

//车系改变时查询车型
export const getModelAll = params => axios.post(`${SERVER.midEndDictCenter}/basicdata/basicdata/model/all`, params);

//车型改变时查询配置
export const getConfigAll = params => axios.post(`${SERVER.midEndDictCenter}/basicdata/basicdata/config/all`, params);

//查询所有外饰色
export const getColorAll = () => axios.post(`${SERVER.midEndDictCenter}/basicdata/basicdata/color/all`, { data: {} });

//查询所有内饰色
export const getTrimAll = () => axios.post(`${SERVER.midEndDictCenter}/basicdata/basicdata/trim/all`, { data: {} });
